<?xml version="1.0" encoding="UTF-8" ?>
<%@page import="cn.lily.esb.monitor.config.menu.MonitorMenu"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="cn.lily.esb.monitor.config.menu.MonitorMenuSetting"%>
<%
	int firstMenuSize = MonitorMenuSetting.getMemus().size();
	String first = request.getParameter("first");
	String second = request.getParameter("second");	
	if(first == null || first.equals("")){
		first = "0";
	}
	if(second == null|| second.equals("")){
		second = "0";
	}
%>
<div class="navbar-default sidebar" role="navigation">
	<div class="sidebar-nav navbar-collapse">
		<ul class="nav" id="side-menu">
		
			<% for(int i=0;i<firstMenuSize;i++){ 
				MonitorMenu firstMenu = MonitorMenuSetting.getMonitorMenu(i+"");
				int secondMenuSize = firstMenu.getChilds().size();
			%>
			
			<% if(first.equals(i+"")){ %>
			<li class="active">		
			<% }else{ %>
			<li>		
			<% } %>
						
				<a href="#">
					<i class="<%=firstMenu.getImgSrc()%> nav_icon"></i>
					<%=firstMenu.getLabel() %>
					<span class="fa arrow"></span>
				</a>
				
				<% if(first.equals(i+"")){ %>
				<ul class="nav nav-second-level in">	
				<% }else{ %>
				<ul class="nav nav-second-level">	
				<% } %>
								
				<% for(int t=0;t<secondMenuSize;t++){
					 MonitorMenu secondMenu = firstMenu.getChilds().get(t+"");%>					 
						<li>
							<a href="monitor_home.jsp?first=<%=i%>&second=<%=t%>">
								<%=secondMenu.getLabel()%>
							</a>
						</li>					 
				<%}%>
				</ul>			
			</li>			
			<% } %>
		</ul>
	</div>
</div>